﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace _074.EFCore_Mysql乐观并发控制
{
	internal class HouseConfig:IEntityTypeConfiguration<House>
	{
		public void Configure(EntityTypeBuilder<House> builder)
		{
			builder.ToTable("T_Houses");
			builder.Property(b => b.Name).IsRequired();
			builder.Property(h => h.Owner).IsConcurrencyToken();
		}
	}
}
